<extend name="./app/Tpl/Public/template.html" />
<block name="content_body">
	<div class="pad-lr-10">
	    <div style="padding:10px; overflow:hidden;">
	    	<div class="main_top" style="clear:both;"><h4>温馨提示：</h4>
    			<ul>
    				<li class="green">1.完善团购商品描述</li>
    			</ul>
	    	</div>
	    </div>
	    <form name="form_edit" id="form_edit" action="{:U('doUpd')}" method="post">
	    	<input type="hidden" name="id" id="id"  value="{$detail.id}">
	    	<input type="hidden" name="upd_type" id="upd_type"  value="{$detail.upd_type}">
	        <table width="100%" cellpadding="2" cellspacing="1" class="table_form">  
	            <tr>
	                <th width="100"><span class="required">*</span>商品长名称:</th>
	                <td>
	                	<input type="text" name="title" id="title" class="input-text-long" value="{$detail.title}">
	                </td>
	            </tr>
	       		
	            <tr>
	                <td colspan="2">
	                	<if condition="$detail['upd_type'] eq 'mobile'">
	                	手机端详细<br>
	                	<textarea id="ke_content" name="content" style="width:90%;height:300px;visibility:hidden;">{$detail.content}</textarea>
	                	</if>
	                	<if condition="$detail['upd_type'] eq 'pc'">
	                	电脑端详细<br>
	                	<textarea id="ke_content" name="content_pc" style="width:90%;height:300px;visibility:hidden;">{$detail.content_pc}</textarea>
	                	</if>
	                </td>
	            </tr>		            	            		            	            	            		            	
	            <tr>
		            <td colspan="2">
		            	
			            <div class="explain-col">
			            	<input type="button" name="submitBtn" value="更新" onclick="doSubmit()">
	        				<input type="button" name="reset" value="返回列表" onclick='redirect("{:U('index')}")'>
			        	</div>
		            </td>
	            </tr>
	        </table>
	    </form>
	</div>
<script type="text/javascript" src="__ROOT__/statics/scripts/kindeditor/kindeditor-all-min.js"></script>
<script type="text/javascript">

var editor;
$(function(){
	KindEditor.ready(function(ke) {
		  	editor = ke.create('#ke_content');
	});
})
function doSubmit(){
	editor.sync();
	$('#form_edit').submit();
}

</script>
</block>	